home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: server.blaze.net.au!csource!not-for-mail
- From: David.Powell@f309.n632.z3.fidonet.org (David Powell)
- Subject: Modern "Effecient" Compilers
- Sender: news@blaze.net.au (news)
- Organization: FidoNet: Melbourne PC User Group BBS
- Message-ID: <662_9602110059@csource.blaze.net.au>
- X-Nntp-Posting-Host: csource.blaze.net.au
- Date: Fri, 9 Feb 1996 19:17:12 GMT
-
- I would just like to mention something I noticed while compiling a "zero
- length" (ie consisting only of the line main(){} ) cpp file in BC++ 4.52.
- I ensured that all RTTI, exceptions etc were off, and used the
- optmize(size) style for my executable and code nodes of my project. Yet
- despite this, and only linking the run-time libraries, my small memory
- model application took up 28kb. Changing to tiny reduced the executable
- size to 6kb. By not linking in the run-time libraries I managed to produce
- a 500 byte executable, although it crashed of course. My question is, why
- does 28k of rubbish get linked into my executable when I am making no
- external references. (I have all debugging off of course). I thought that
- only code which resolved external references is linked in. Does anybody no
- why this problem occurs, or ways of getting around it without rewriting
- lots of code, I would be most grateful if u would post a reply. It is
- quite embarrassing when friends using only the "inferior" Turbo Pascal
- 6.0/7.0 compiler can produce 1k files without tweaking anything. Are the
- compiler writers of today too willing to sacrifice performance for good
- engineering principals?
-
- cya, dave
-
-
- --
- David.Powell@f309.n632.z3.fidonet.org, David Powell 3:632/309 (FidoNet)
-
-